﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    public string OrderId = string.Empty;
    string emId = string.Empty;
    public string roleId = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        //Response.Write("<script>alert(1);</script>");

        if (Session["studIdcard"] != null && Session["userName"] != null)
        {
            uid.Text = Session["userName"].ToString();

            DataTable dt = User_Control.getUserInfoByLoginMsg(Session["userName"].ToString(), Session["studIdcard"].ToString());
            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                roleId = dr["RoleID"].ToString().Trim();
            }

            //studIdCard = Session["studIdcard"].ToString();
            //emId = Session["emId"].ToString();
            //DataTable dt = Exam.getOrderInfoByMsg(studIdCard, emId);
            //if (dt.Rows.Count > 0)
            //{
            //    DataRow dr = dt.Rows[0];
            //    OrderId = dr["OrderID"].ToString();
            //}
        }
        else
        {
            Response.Redirect(BSUtility.mainUrl + "Users/UserLogin.aspx");
        } 
    }
}
